package queryClass;

public class Queries {

	public static String insertPersonalDetails="INSERT INTO CLIENT_MASTER (`Client_email`, `password`, `ClientFname`, `ClientLname`, `Gender`, `ClientDOB`, `ClientMobile`, `ClientLandLine`, `faxno`, `officeno`, `ClientState`, `ClientHomeCity`, `ClientHomePincode`, `ClientAddress`, `PanNo`, `OAddress`, `Opincode`, `OCity`, `Occupation`, `status`, `KYCStatus`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
	public static String insertBankDetails="INSERT INTO CLIENT_BANK_DETAILS (`ClientEmail` ,`BankAccountNo` ,`BankName` ,`BankBranchName` ,`AccountType` ,`MICRCode` ,`RTGSCode` ,`BankCity`) VALUES(?,?,?,?,?,?,?,?)";
	public static String addPollQuery="INSERT INTO POLL (`pollQuestion`, `Yes`, `No`, `CantSay`) VALUES(?,?,?,?)";
	public static String retrievepoll="select pollQuestion from poll where pollid=(select MAX(pollid) from poll)";
	public static String checkLogin="SELECT CLIENT_EMAIL,PASSWORD,CLIENTFNAME,CLIENTLNAME FROM CLIENT_MASTER";
	public static String calculatepoll="select Yes,No,CantSay,pollid from poll where pollid=(select MAX(pollid) from poll)";
	public static String updateYes="UPDATE poll SET yes=yes+1 WHERE pollid=";
	public static String updateNo="UPDATE poll SET no=no+1 WHERE pollid=";
	public static String updateCantSay="UPDATE poll SET cantsay=cantsay+1 WHERE pollid=";
	
	
	
	
	
	public static String fetchFundHouseId = "select AMC_ID from mutual_fund_house where AMC_NAME=?";//query for fetching amc_id while adding new scheme

	public static String addScheme = "INSERT INTO mutual_fund_schemes (Scheme_name,Amc_id,Scheme_option,Scheme_dividend_payout_option,Scheme_divdend_reinvest_option,Scheme_purchase_available,Scheme_redeem_available,scheme_sip_available,scheme_minimum_purchase_ammount,scheme_purchase_multiple_ammount,scheme_add_minimum_purchase_ammount,scheme_minimum_redeem_ammount,scheme_redeem_multiple_ammount,scheme_minimum_redeem_units,scheme_redeem_multiple_units,scheme_cutoff_time_purchase,scheme_cutoff_time_redeem,scheme_sip_frequency,scheme_sip_minimum_installment,scheme_sip_dates,scheme_sip_minimum_ammount,SCM_switch_available) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";//Query to add new scheme

	public static String fetchPersonalDetail = "SELECT * FROM client_master WHERE Client_email = ?";//query to fetch personal details from database to display on buy page onload

	public static String fetchFundHouseNames = "SELECT AMC_NAME FROM mutual_fund_house";//query to fetch fund house names to be populated on the buy page dropbox

	public static String fetchFundSchemeNames = "SELECT Scheme_name FROM mutual_fund_schemes WHERE Amc_id = ?";

	public static String fetchAddressDetail = "SELECT ClientAddress,ClientHomeCity,ClientHomePincode,officeno,ClientLandLine,faxno,OAddress,Ocity.Opincode FROM client_master WHERE Client_email = ?";

}
